====== Pairwise 2-States ======

\( \require{newcommand} \)
\( \newcommand{\diff}[2]{\frac{d{#1}}{d{#2}}} \)

Here we consider an extension to the [[..:simple_2-states:start]] model where we relax the //simplicity// criteria.

===== Pairwise =====

//Pairwise// reactions satisfy the following criteria:
  - The assumptions of [[wp>reaction kinetics]] apply.
  - All reactions have a total [[wp>order of reaction]] less than three.  There can be zero (nil), one (solo), or two (pair) reactants involved in a reaction.  We assume higher order reactions are negligibly rare or can be decomposed into sets of lower order reactions.

Unlike the //simplicity// condition we **do not** require:
  - All reactions involve change to only one reactant.  The product set differs from the reactant set by exactly one individual.  We assume reactions with more than one reactant changing are composed of stages where one reactant changes at a time.
  - Every reactant/product represents a single individual in the population.  Bonded states are not allowed.

Instead, any product set is permitted.  Our only restriction is that reactions involve no more than two reactants.

===== States =====

States refers to the number of distinguishable states of the individuals in the population.  A state may be a species or a member's gender or physiological state.  In this 2-state model individuals are characterized as being in one of two possible states.  We denote our two states by \(X\) and \(Y\)).

===== Reactions =====

In the case of a pairwise 2-state system this means there are six groups of reactions, characterized by the possible reactant sets:
\[
\begin{array}{rcl}
  \emptyset & \xrightarrow{\alpha_{ij}} & a^{00}_i X + b^{00}_j Y \\
  X   & \xrightarrow{\beta^{10}_{ij}}   & a^{10}_i X + b^{10}_j Y \\
  Y   & \xrightarrow{\beta^{01}_{ij}}   & a^{01}_i X + b^{01}_j Y \\
  2 X & \xrightarrow{\gamma^{20}_{ij}}  & a^{20}_i X + b^{20}_j Y \\
  X+Y & \xrightarrow{\gamma^{11}_{ij}}  & a^{11}_i X + b^{11}_j Y \\
  2 Y & \xrightarrow{\gamma^{02}_{ij}}  & a^{02}_i X + b^{02}_j Y.
\end{array}
\]
where \(i, j\) are integer indices and \(a, b\) are non-negative integers.

===== Dynamics =====

The densities of each type, \(x\) and \(y\), will behave as
\[
\begin{array}{rcl}
  \diff{x}{t} & = & a_x x^2 + b_x x y + C_x y^2 + d_x x + E_x y + F_x \\
  \diff{y}{t} & = & A_y x^2 + b_y x y + c_y y^2 + D_y x + e_y y + F_y
\end{array}
\]
where the constants are composed of the reaction parameters as follows:
\[
\begin{array}{rclrcl}
  a_x & \equiv & \sum_{ij} \gamma^{20}_{ij} (a^{20}_i - 2) & A_y & \equiv & \sum_{ij} \gamma^{20}_{ij} b^{20}_j \geq 0 \\ 
  b_x & \equiv & \sum_{ij} \gamma^{11}_{ij} (a^{11}_i - 1) & b_y & \equiv & \sum_{ij} \gamma^{11}_{ij} (b^{11}_j - 1) \\
  C_x & \equiv & \sum_{ij} \gamma^{02}_{ij} a^{02}_i \geq 0 & c_y & \equiv & \sum_{ij} \gamma^{02}_{ij} (b^{02}_j - 2) \\
  d_x & \equiv & \sum_{ij} \beta^{10}_{ij} (a^{10}_i - 1) & D_y & \equiv & \sum_{ij} \beta^{10}_{ij} b^{10}_j \geq 0 \\ 
  E_x & \equiv & \sum_{ij} \beta^{01}_{ij} a^{01}_i \geq 0 & e_y & \equiv & \sum_{ij} \beta^{01}_{ij} (b^{01}_j - 1) \\
  F_x & \equiv & \sum_{ij} \alpha_{ij} a^{00}_i \geq 0 & F_y & \equiv & \sum_{ij} \alpha_{ij} b^{00}_j \geq 0.
\end{array}
\]
(Capitalized constants serve as reminders that they are strictly non-negative.)

==== Solution ====

Unfortunately, the non-negativity constraints on some of the parameters doesn't help simplify analysis of the dynamics.  The easiest approach for known parameter values is to plot \(\diff{x}{t}\) versus \((x,y)\) to find the regions where \(x\) is growing, declining, and unchanging (//nullclines//).  Then do the same for \(\diff{y}{t}\).  Overlap the two plots to find the flow for all \((x,y)\) (keep in mind we are only interested in the quadrant \(x,y\geq 0\)).  

The intersections of the nullclines, where \(\diff{x}{t}=\diff{y}{t}=0\), indicate the dynamical //equilibria//, where the population remains unchanging.  It may be possible to perform a //stability analysis// to determine the behaviour near an equilibrium.

====== Biological plausibility ======

Let's invoke some biologically-plausible constraints to see if we can make more analytic in-roads.  In particular, let's assume that \(a_x, c_y \leq 0\).  Biologically, this means that large populations of isolated \(X\)'s (or isolated \(Y\)'s) cannot grow without bound.

<div right important>
I'm not satisfied with this constraint.  It may help mathematically (allows only hyperbolic nullclines in generic case) but it's too strong: for example, maybe a prey species is only kept under control by predation.  Remove the predators and the population would explode (at least to 2nd order approximation until higher order terms dominated).
</div>